#ifndef LINKLIST_HPP__
#define LINKLIST_HPP__
#include "common.hpp"
typedef struct LNode
{
    int data;
    LNode *next;
}LNode, *LinkList;

Status initList(LinkList *L);

Status destoryList(LinkList L);

Status clearList(LinkList L);

Status listEmpty(LinkList L);

int listLength(LinkList L);

Status getElem(LinkList L,int i,ElemType *e);

int locateElem(LinkList L,ElemType e,Status(*compare)(ElemType,ElemType));

Status PriorElem(LinkList L,ElemType cur_e,ElemType *pre_e);

Status NextElem(LinkList L,ElemType cur_e,ElemType *next_e);

Status ListInsert(LinkList L,int i,ElemType e);

Status ListDelete(LinkList L,int i,ElemType *e);

Status ListTraverse(LinkList L,void(*vi)(ElemType));
#endif